package com.yonyou.cyxdms.basedata.service.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 产品
 * </p>
 *
 * @author guorp1
 * @since 2018-11-12
 */

public class CarparamcolorDTO extends BaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;
    /**
     * 来源ID
     */
    private Long sourceId;
    /**
     * APP_ID
     */
    private String appId;
    /**
     * CarID
     */
    private Long carId;
    /**
     * 汽车名称
     */
    private String carName;
    /**
     * 来源车系ID
     */
    private Integer sourceserialId;
    /**
     * 车系ID
     */
    private Integer serialId;
    /**
     * rgb
     */
    private String rgb;
    /**
     * 来源颜色ID
     */
    private Integer sourcecolorId;
    /**
     * 颜色ID
     */
    private Integer colorId;
    /**
     * 指导价格
     */
    private Double referPrice;
    /**
     * 颜色名称
     */
    private String colorName;
    /**
     * 类型
     */
    private Integer type;
    /**
     * 产品代码
     */
    private String productCode;
    /**
     * 产品名称
     */
    private String productName;
    /**
     * 生产状态
     */
    private Integer productStatus;
    /**
     * 颜色代码
     */
    private String colorCode;
    /**
     * 数据来源
     */
    private Integer sourceChannel;
    /**
     * 是否有效
     */
    private Integer isValid;
    /**
     * 上市日期
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime enterDate;
    /**
     * 退市日期
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime exeuntDate;
    /**
     * 时间戳
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime changeAt;
    /**
     * 内饰代码
     */
    private String trimCode;
    /**
     * 内饰颜色名称
     */
    private String trimColorName;

    public CarparamcolorDTO() {
        super();
    }


    public Long getId() {
        return id;
    }


    public void setId(Long id) {
        this.id = id;
    }


    public Long getSourceId() {
        return sourceId;
    }


    public void setSourceId(Long sourceId) {
        this.sourceId = sourceId;
    }


    public String getAppId() {
        return appId;
    }


    public void setAppId(String appId) {
        this.appId = appId;
    }


    public Long getCarId() {
        return carId;
    }


    public void setCarId(Long carId) {
        this.carId = carId;
    }


    public String getCarName() {
        return carName;
    }


    public void setCarName(String carName) {
        this.carName = carName;
    }


    public Integer getSourceserialId() {
        return sourceserialId;
    }


    public void setSourceserialId(Integer sourceserialId) {
        this.sourceserialId = sourceserialId;
    }


    public Integer getSerialId() {
        return serialId;
    }


    public void setSerialId(Integer serialId) {
        this.serialId = serialId;
    }


    public String getRgb() {
        return rgb;
    }


    public void setRgb(String rgb) {
        this.rgb = rgb;
    }


    public Integer getSourcecolorId() {
        return sourcecolorId;
    }


    public void setSourcecolorId(Integer sourcecolorId) {
        this.sourcecolorId = sourcecolorId;
    }


    public Integer getColorId() {
        return colorId;
    }


    public void setColorId(Integer colorId) {
        this.colorId = colorId;
    }


    public Double getReferPrice() {
        return referPrice;
    }


    public void setReferPrice(Double referPrice) {
        this.referPrice = referPrice;
    }


    public String getColorName() {
        return colorName;
    }


    public void setColorName(String colorName) {
        this.colorName = colorName;
    }


    public Integer getType() {
        return type;
    }


    public void setType(Integer type) {
        this.type = type;
    }


    public String getProductCode() {
        return productCode;
    }


    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }


    public String getProductName() {
        return productName;
    }


    public void setProductName(String productName) {
        this.productName = productName;
    }


    public Integer getProductStatus() {
        return productStatus;
    }


    public void setProductStatus(Integer productStatus) {
        this.productStatus = productStatus;
    }


    public String getColorCode() {
        return colorCode;
    }


    public void setColorCode(String colorCode) {
        this.colorCode = colorCode;
    }


    public Integer getSourceChannel() {
        return sourceChannel;
    }


    public void setSourceChannel(Integer sourceChannel) {
        this.sourceChannel = sourceChannel;
    }


    public Integer getIsValid() {
        return isValid;
    }


    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }


    public LocalDateTime getEnterDate() {
        return enterDate;
    }


    public void setEnterDate(LocalDateTime enterDate) {
        this.enterDate = enterDate;
    }


    public LocalDateTime getExeuntDate() {
        return exeuntDate;
    }


    public void setExeuntDate(LocalDateTime exeuntDate) {
        this.exeuntDate = exeuntDate;
    }


    public LocalDateTime getChangeAt() {
        return changeAt;
    }


    public void setChangeAt(LocalDateTime changeAt) {
        this.changeAt = changeAt;
    }


    public String getTrimCode() {
        return trimCode;
    }


    public void setTrimCode(String trimCode) {
        this.trimCode = trimCode;
    }


    public String getTrimColorName() {
        return trimColorName;
    }


    public void setTrimColorName(String trimColorName) {
        this.trimColorName = trimColorName;
    }


    @Override
    public String toString() {
        return "CarparamcolorDTO{" +
                "id=" + id +
                ", sourceId=" + sourceId +
                ", appId=" + appId +
                ", carId=" + carId +
                ", carName=" + carName +
                ", sourceserialId=" + sourceserialId +
                ", serialId=" + serialId +
                ", rgb=" + rgb +
                ", sourcecolorId=" + sourcecolorId +
                ", colorId=" + colorId +
                ", referPrice=" + referPrice +
                ", colorName=" + colorName +
                ", type=" + type +
                ", productCode=" + productCode +
                ", productName=" + productName +
                ", productStatus=" + productStatus +
                ", colorCode=" + colorCode +
                ", sourceChannel=" + sourceChannel +
                ", isValid=" + isValid +
                ", enterDate=" + enterDate +
                ", exeuntDate=" + exeuntDate +
                ", changeAt=" + changeAt +
                ", trimCode=" + trimCode +
                ", trimColorName=" + trimColorName +
                "}";
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author guorp1
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author guorp1
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "id");
    }

}
